

#include "timer2.h"
#include "key.h"
#include "show.h"
#include "Delay.h"



void main()
{
	Latch(RELAY,0x00);
	Latch(LED,0xff);
	ds18b20_zhuanhuan();
	Delay(1000);
	Timer2Init();
	while(1)
	{
		
			key_mode();
	}
}


void Timer2()interrupt 12 using 1
{
	static unsigned int count1 = 0;
	T2L = 0x20;		//设置定时初值
	T2H = 0xD1;		//设置定时初值
	nixie_loop();
	if(++count1 == 20)
	{
		count1 = 0;
		key_loop();
	}
}
